import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Question dasd
 * @Date 2022/12/19 14:55
 * @Solution
 */
public class dasd {
    public static void main(String[] args) {
        Date date = new Date();
        java.sql.Date date2 = new java.sql.Date(2021,1,3);
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        String date1 = simpleDateFormat.format(date);
        System.out.println(date1);
        System.out.println(date2);
    }
}
